package org.example.code.test2024.ten_mouth;

import java.util.Scanner;

public class test1012 {
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] dp = new int[n+1];
        dp[0] = 0;
        dp[1] = 1;
        dp[2] = 2;
        for(int i=3;i<=n;i++){
            dp[i]=dp[i-1]+dp[i-2];
        }
        System.out.println(dp[n]);
    }
    public long matrixSum(int n, int[][] operations) {
        long[][] result = new long[n][n];
        for(int j=0;j<operations.length;j++){
            int[] o = operations[j];
            if(o[0]==0){
                for(int i=0;i<n;i++){
                    result[o[1]][i]=o[2];
                }
            }else {
                for(int i=0;i<n;i++){
                    result[i][o[1]]=o[2];
                }
            }
        }
        long sum = 0;
        for(int i=0;i<n;i++){
            for(int j=0;j<n;j++){
                sum = sum + result[i][j];
            }
        }
        return sum;
    }
}
